home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
-
-
- pNAMEq pq pq pq pq pq pq pq pq
-
- cpp - a stand-alone C preprocessor
-
-
-
- pSYNOPSISq pq pq pq pq pq pq pq pq
-
- pcppq [ p-CTVq ] [ p-Pq[012]pqpq ] [ p-Dqnamepqpq ]
-
- [ p-Dqnamep=qdefpq ] [ p-Iqdirectorypqpq ] [ p-Uqnamepqpq ]
-
- [ p-ansiq ] [ p-pedanticq ] [ p-fq[no-]pc++-commentsqpq ]
-
- [ p-fq[no-]pimplicit-newlinesqpq ]
-
- [ p-Wq[no-]pbad-charsqpq ] [ p-Wq[no-]pnested-commentsqpq ]
-
- [ p-Wq[no-]pbad-concat-tokensqpq ] [ p-Wq[no-]punknown-pragmaqpq ]
-
- [ pinput-fileq [ poutput-fileq ] ]
-
-
-
- pDESCRIPTIONq pq pq pq pq pq pq pq pq
-
-
-
- pcppq is a stand-alone C preprocessor, intended for use with C
-
- compilers such as HSC which do not provided access to
-
- preprocessor output. It implements translation phases 1 through
-
- 4 as specified by the standards document ANSI/ISO 9899-1990
-
- describing the C programming language, including trigraphs,
-
- token pasting and stringizing.
-
-
-
- pcppq optionally accepts two filenames as arguments. pinput-fileq
-
- and poutput-fileq are, respectively, the input and output files
-
- for the preprocessor. If not specified, or if given as `-',
-
- they default to the standard input and the standard output,
-
- respectively.
-
-
-
- pOPTIONSq pq pq pq pq pq pq pq pq
-
-
-
- p-Cq
-
- Pass all comments (except those that appear on pcppq
-
- directive lines) through the preprocessor. By default,
-
- pcppq strips out C-style comments.
-
-
-
- p-Pq[012]
-
- Preprocess the input without producing the line control
-
- information used by the next pass of the C compiler. A
-
- numeric argument can be passed to -P: 0 specifies that
-
- no line control information control is generated, and is
-
- equivalent to -P; 1 specifies that normal line control
-
- information is generated, which is the default; and 2
-
- specifies that line control information is generated in
-
- the form of preprocessor p#lineq directives.
-
-
-
- p-Tq
-
- Translate trigraphs in the input file. This behavior is
-
- implied by the p-ansiq option.
-
-
-
- p-Dq name
-
- Define pnameq as 1 (one). This is the same as if a
-
- p-Dqnamep=1qpq option appeared on the pcppq command line, or as
-
- if a
-
-
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 1
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
-
-
- p#defineq name p1qpq
-
-
-
-
-
- line appeared in the source file that pcppq is
-
- processing.
-
-
-
- p-Dqnamep=qdef
-
- Define pnameq as if by a p#defineq directive. This is the
-
- same as if a
-
-
-
-
-
- p#defineq name pdefqpq
-
-
-
-
-
- line appeared in the source file that pcppq is
-
- processing. The p-Dq option has lower precedence than the
-
- p-Uq option; that is, if the same name is used in both a
-
- p-Uq option and a p-Dq option, the name will be undefined
-
- regardless of the order of the options.
-
-
-
- p-Iqdirectory
-
- Insert pdirectoryq into the search path for p#includeq
-
- files with names not beginning with q`p/q', `p\q´,pq or a drive
-
- specifier. pdirectoryq is inserted ahead of the standard
-
- list of ``include'' directories. Thus, p#includeq files
-
- with names enclosed in double-quotes (p"q) are searched
-
- for first in the directory of the file with the p#includeq
-
- line, then in directories named with p-Iq options, and
-
- lastly, in directories from the standard list. For
-
- p#includeq files with names enclosed in angle-brackets
-
- q(p<>q),pqpq the directory of the file with the p#includeq line
-
- is not searched. See pUSAGEq below for exact details of
-
- this search order.
-
-
-
- p-Sq[filename]
-
- Specify an alternate configuration file. If pfilenameq is
-
- present, the specified file is read instead of the
-
- default configuration file; if pfilenameq is absent, the
-
- default configuration file is simply not read. See
-
- pUSAGEq below for further details.
-
-
-
- p-Uqname
-
- Remove any initial definition of pnameq,pqpq where pnameq is a
-
- symbol that is predefined by the preprocessor.
-
-
-
- p-Vq
-
- Print version information to pstderrq.pqpq
-
-
-
- p-ansiq
-
- Define the preprocessor token p__STDC__q to have value 1,
-
- and enable trigraph translation. To get p__STDC__q
-
- without trigraph translation, you can specify the
-
- options p-ansiq p-Tq.pqpq
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 2
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
- p-pedanticq
-
- Issue warnings for constructs which, while recognized
-
- and accepted by most preprocessors, are not strictly
-
- allowed by the ANSI/ISO standard. Currently the
-
- following such constructs are recognized:
-
-
-
-
-
- * Numeric tokens which fall afoul of the new
-
- `preprocessing number' definition in ANSI/ISO 6.1.8,
-
- such as `0x123e+1'. With or without p-pedanticq, pcppq will
-
- immediately retokenize the offending token in the
-
- expected manner.
-
-
-
- The following p-fq and p-Wq options can be negated by adding a pno-q
-
- before the option name. Some are on by default.
-
-
-
- p-fc++-commentsq
-
- Support the C++ comment indicator q`p//q´.pqpq With this option
-
- active, everything on the line after the p//q is treated
-
- as a comment. Off by default.
-
-
-
- p-fimplicit-newlinesq
-
- Allow string literals to have embedded newlines, as in
-
- the following example:
-
-
- "this is an
- example"
-
- This option allows pcppq to be used on code written for
-
- certain rather irritatingly nonstandard compilers (we
-
- won't mention GCC's name...). Off by default.
-
-
-
- p-Wbad-charsq
-
- Issue a warning if a character that cannot legally
-
- appear in a C program appears in the input. On by
-
- default.
-
-
-
- p-Wnested-commentsq
-
- Issue a warning if a comment-start character sequence
-
- q(`p/*q´,pqpq and q`p//q´pqpq if p-fc++-commentsq is active) appears in
-
- a comment. Off by default.
-
-
-
- p-Wbad-concat-tokensq
-
- Issue a warning if the token concatenation operator ##
-
- produces an illegal C token. On by default.
-
-
-
- p-Wunknown-pragmaq
-
- Issue a warning if the input contains a p#pragmaq
-
- directive that pcppq does not recognize. Off by default.
-
-
-
- Options beginning with p-Xq are for specialized interactions with
-
- particular programs, and should not generally be invoked
-
- directly by the user. The following such options are currently
-
- recognized:
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 3
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
- p-Xfluffq
-
- This option is used by the pfluffq(1)pqpq source code
-
- checker. It causes the preprocessor token p__FLUFF__q to
-
- be defined, and enables certain related pragmas. See
-
- the pfluffq(1)pqpq documentation for further information.
-
-
-
- pUSAGEq pq pq pq pq pq pq pq pq
-
- If you are familiar with C, you should already know about the
-
- basic workings of pcppq.pqpq We will not go into a detailed
-
- description here, since any good book on C could do better;
-
- instead, we will describe details particular to this
-
- implementation.
-
-
-
- ppDirectory Search Orderqq pq pq pq pq pq pq pq pq
-
-
-
-
-
- A file specified in an p#includeq directive will be searched for
-
- in the following directories, in order:
-
-
-
- 1.
-
- The directory of the file that contains the p#includeq
-
- directive, if the directive is of the form `p#includeq
-
- "filename"'.
-
-
-
- 2.
-
- The directories specified by p-Iq options, in the order
-
- they were specified.
-
-
-
- 3.
-
- The list of directories specified in the pINCLUDEq
-
- environment variable, in order.
-
-
-
- ppSpecial Namesqq pq pq pq pq pq pq pq pq
-
-
-
-
-
- The following macros are predefined by pcppq:pqpq
-
-
-
- p__STDC__q
-
- Expands to 1 if the p-ansiq option is specified.
-
-
-
- p__LINE__q
-
- Expands to an integer constant representing the current
-
- line number in the current input file.
-
-
-
- p__FILE__q
-
- Expands to a string constant representing the name of
-
- the current input file.
-
-
-
- p__DATE__q
-
- Expands to a string constant of the form "Mmm dd yyyy"
-
- representing the date on which preprocessing was
-
- initiated.
-
-
-
- p__TIME__q
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 4
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
- Expands to a string constant of the form "hh:mm:ss"
-
- representing the system time at which preprocessing was
-
- initiated.
-
-
-
- ppConfiguration filesqq pq pq pq pq pq pq pq pq
-
-
-
-
-
- pcppq uses a configuration file to set up site-specific predefined
-
- macros. By default, the directories specified in the pLIBq
-
- environment variable are searched in order for the file
-
- pcpp_defs.hq;pqpq an alternate file can be specified from the command
-
- line with the p-Sq option.
-
-
-
- The configuration file is read just like a normal input file,
-
- except that text other than preprocessor directives is not
-
- passed through to the output file. Normally the configuration
-
- file will contain only comments and preprocessor directives. In
-
- addition, two special pragmas are recognized within the
-
- configuration file only:
-
-
-
- #pragma CPP_cmdline_arg poptionq
-
- The single token poptionq is processed as though it had
-
- appeared as a command-line option. The option may be
-
- undone from the command line, except as indicated
-
- below.
-
-
-
- #pragma CPP_delayed
-
- Normally, the configuration file is processed before
-
- command-line options are processed, to allow the
-
- commands therein to be overridden by command-line
-
- options. This pragma causes the command line to be
-
- processed before the remainder of the file, allowing
-
- conditional setup based on parameters set from the
-
- command line. Note that macro definitions and
-
- command-line specifications made after this pragma
-
- cannot be undone from the command line.
-
-
-
- For example, the following configuration file activates C++
-
- comments by default, and sets the macro p_PROTO()q according to
-
- the presence of the p-ansiq option:
-
-
- #pragma CPP_cmdline_arg -fc++-comments
- #pragma CPP_delayed
- #ifdef __STDC__
- # define _PROTO(x) x
- #else
- # define _PROTO(x) ()
- #endif
-
-
-
- pSEEq pALSOq pq pq pq pq pq pq pq
-
- pfluffq(1)pqpq
-
-
-
- Documentation for your C compiler
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 5
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
- Any good book on C.
-
-
-
- pDIAGNOSTICSq pq pq pq pq pq pq pq pq
-
-
-
- The error messages produced by pcppq are intended to be
-
- self-explanatory. The line number and filename where the error
-
- occurred are printed along with the diagnostic.
-
-
-
- pBUGSq pq pq pq pq pq pq pq pq
-
- None that I know of, but there's almost always One More Bug(TM).
-
- If you should find one, please report it to me, Scott Bigham, at
-
- dsb@cs.duke.edu.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 6
-
-
-
-
-
-